package com.muyu.system.domain;

import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;


/**
 * 购物车对象 danmo_shopping_cart
 *
 * @author yangle
 * @date 2024-09-29
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class DanmoShoppingCart extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 购物车项唯一标识 */
    private Long id;

    /** 关联用户ID */
    @Excel(name = "关联用户ID")
    private Long userId;

    /**
     * 是否选中
     */
    @Excel(name = "是否选中")
    private Boolean checked;

    /** 关联产品ID */
    @Excel(name = "关联产品ID")
    private Long productId;

    /** 产品数量，默认为1 */
    @Excel(name = "产品数量，默认为1")
    private Long quantity;

    /** 产品价格，默认为1 */
    @Excel(name = "产品价格，默认为0")
    private BigDecimal price;

    /** 商品类型Id */
    @Excel(name = "商品类型Id")
    private Long shoppingSkuId;

//    public void setId(Long id)
//    {
//        this.id = id;
//    }
//
//    public Long getId()
//    {
//        return id;
//    }
//    public void setUserId(Long userId)
//    {
//        this.userId = userId;
//    }
//
//    public Long getUserId()
//    {
//        return userId;
//    }
//    public void setProductId(Long productId)
//    {
//        this.productId = productId;
//    }
//
//    public Long getProductId()
//    {
//        return productId;
//    }
//    public void setQuantity(String quantity)
//    {
//        this.quantity = quantity;
//    }
//
//    public String getQuantity()
//    {
//        return quantity;
//    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("productId", getProductId())
            .append("quantity", getQuantity())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }

}
